package org.ztr.yanai.blog.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.ztr.yanai.blog.entity.Category;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 10:00
 * @Description: 分类服务接口
 * @Version: 1.0
 */
public interface CategoryService {
    
    /**
     * 创建分类
     */
    boolean createCategory(Category category);
    
    /**
     * 根据ID删除分类
     */
    boolean deleteCategoryById(Long id);
    
    /**
     * 根据ID获取分类
     */
    Category getCategoryById(Long id);
    
    /**
     * 分页查询分类
     */
    Page<Category> listCategoriesByPage(int pageNum, int pageSize, QueryWrapper<Category> wrapper);
    
    /**
     * 更新分类
     */
    boolean updateCategory(Category category);
}
